﻿<link href="@Url.Content("~/content/activitie_detail.css")" rel="stylesheet" type="text/css"/>
<link href="@Url.Content("~/content/table_btn.css")" rel="stylesheet" type="text/css"/>

<!--[if lt IE 8]>
    <link href="@Url.Content("~/content/activitie_create.css")" rel="stylesheet" type="text/css"/>
<![endif]-->

<noscript>
    <link href="@Url.Content("~/content/activitie_create.css")" rel="stylesheet" type="text/css"/>
    <link href="@Url.Content("~/content/activitie_noscript.css")" rel="stylesheet" type="text/css"/>
</noscript>

@model PessMvc.Models.ChangePasswordQAModel

@{
    ViewBag.Title = "Change Password";
}

<h2>Change Password</h2>

@if (User.IsInRole("ExpertJudge"))
{
    <p style="clear:both;float:none;padding: 5px 0px 0px 5px;color:red">Reviewers have to change the default password at first logon.</p>
}
<p style="clear: both; float: none; padding: 5px 0px 0px 5px;">Please use the form below to change password. The minimum length of password is @Membership.MinRequiredPasswordLength .  </p>

<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>

@using (Html.BeginForm()) {
    @Html.ValidationSummary(true, "Change password failed. Please try again.")
    <div>
        <fieldset class="edit">
            <legend>Username：@Membership.GetUser().UserName</legend>

            <div class="editor-label">
                @Html.LabelFor(m => m.OldPassword)
            </div>
            <div class="editor-field">
                @Html.PasswordFor(m => m.OldPassword)
                @Html.ValidationMessageFor(m => m.OldPassword)
            </div>

            <div class="editor-label">
                @Html.LabelFor(m => m.NewPassword)
            </div>
            <div class="editor-field">
                @Html.PasswordFor(m => m.NewPassword)
                @Html.ValidationMessageFor(m => m.NewPassword)
            </div>

            <div class="editor-label">
                @Html.LabelFor(m => m.ConfirmPassword)
            </div>
            <div class="editor-field">
                @Html.PasswordFor(m => m.ConfirmPassword)
                @Html.ValidationMessageFor(m => m.ConfirmPassword)
            </div>

            <div class="editor-label">
                @Html.LabelFor(m => m.SecurityQeustion)
            </div>
            <div class="editor-field">
                @Html.EditorFor(m => m.SecurityQeustion)
                @Html.ValidationMessageFor(m => m.SecurityQeustion)
            </div>

            <div class="editor-label">
                @Html.LabelFor(m => m.Answer)
            </div>
            <div class="editor-field">
                @Html.EditorFor(m => m.Answer)
                @Html.ValidationMessageFor(m => m.Answer)
            </div>

            <div class="editor-btn">
                <input type="submit" value="Save" />
            </div>
        </fieldset>
    </div>
}
